<?php

namespace App\Modules\Shop;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Shop
 * @package App\Modules\Shop
 * @property string $name
 * @property string $cover
 * @property string $description
 * @property integer $visitor
 * @property string $tag
 * @property int $is_photography
 * @property array $category
 * @property string $status
 * @property string $goods_number
 * @property string $starting_price
 * @property string $type
 * @property string $features
 * @property string $video
 */
class Shop extends Model
{
    const STATUS_OPEN = 'open';
    const STATUS_CLOSE = 'close';

    const TYPE_PHOTO = '婚纱摄影';
    const TYPE_JEWELRY = '结婚首饰';
    const TYPE_SKINCARE = '美妆护肤';
    const TYPE_FULL_DRESS = '礼服租售';
    const TYPE_ALCOHOL = '婚宴喜酒';
    const TYPE_NULL = "无";

    static $showStatus = [
        self::STATUS_OPEN => '营业',
        self::STATUS_CLOSE => '关门',
    ];

    protected $fillable = [
        'name',
        'cover',
        'description',
        'visitor',
        'tag',
        'is_photography',
        'category',
        'status',
        'goods_number',
        'starting_price',
        'features',
        'type',
        'video',
        'sort',
        'category_ids',
        'type_id',
        'longitude',
        'latitude',
        'phone',

    ];

    protected $casts = [
        'category' => 'array'
    ];
}
